package model

import "time"

type Weather struct {
	ID               string    `json:"id" gorm:"column:id;type:varchar(36);primary_key;default:uuid()"`
	UID              string    `json:"uid" gorm:"column:uid;type:varchar(36)"`
	UNick            string    `json:"unick" gorm:"column:unick;type:varchar(255)"`
	Province         string    `json:"province" gorm:"column:province;type:varchar(36)"`
	City             string    `json:"city" gorm:"column:city;type:varchar(36)"`
	AdCode           string    `json:"adcode" gorm:"column:adcode;type:varchar(36)"`
	Weather          string    `json:"weather" gorm:"column:weather;type:varchar(36)"`
	Temperature      string    `json:"temperature" gorm:"column:temperature;type:varchar(36)"`
	Winddirection    string    `json:"winddirection" gorm:"column:winddirection;type:varchar(36)"`
	Windpower        string    `json:"windpower" gorm:"column:windpower;type:varchar(36)"`
	Humidity         string    `json:"humidity" gorm:"column:humidity;type:varchar(36)"`
	ReportTime       string    `json:"reporttime" gorm:"column:reporttime;type:varchar(36)"`
	TemperatureFloat string    `json:"temperature_float" gorm:"column:temperature_float;type:varchar(36)"`
	HumidityFloat    string    `json:"humidity_float" gorm:"column:humidity_float;type:varchar(36)"`
	CreateTime       time.Time `json:"create_time" gorm:"column:create_time;type:timestamp;not null;default:current_timestamp"`
	UpdateTime       time.Time `json:"update_time" gorm:"column:update_time;type:timestamp;not null;default:current_timestamp on update current_timestamp"`
}

// TableName 设置表名
func (Weather) TableName() string {
	return "weather"
}

func AddWeather()    {}
func GetWeather()    {}
func UpdateWeather() {}
func DeleteWeather() {}
